import pandas as pd


def dicretization_test():
    ages = [20, 22, 25, 27, 21, 23, 37, 31, 61, 45, 41, 32]
    bins = [18, 25, 35, 60, 100]
    cats = pd.cut(ages, bins)
    print(cats)
    print(type(cats))
    print(pd.value_counts(cats))


if __name__ == '__main__':
    dicretization_test()